/*******************************************************************************************
 *  Speed.h
 *
 *  Creating and managing Speed object structures.
 *
 *******************************************************************************************/







/*******************************************************************************************
 *  INCLUDES :
 *******************************************************************************************/
#include "BulletMLConsts.h"
#include "BulletMLTypes.h"







/*******************************************************************************************
 *  TYPE definitions :
 *******************************************************************************************/

/*****************************************************/
/* The different type a SPEED object can have :  */
/*****************************************************/
#ifndef _SPD_TYPE_ENUM_
#define _SPD_TYPE_ENUM_
typedef enum {absolute_spd, relative_spd, sequence_spd} SpdType;
#endif



/*****************************************************/
/* The SPEED object strucuture definition :      */
/*****************************************************/
#ifndef _SPEED_STRUCT_
#define _SPEED_STRUCT_
typedef struct {

	ObjType		otype;						/* The object's type, as in ... */
											/* ... the BML type enum.       */

	SpdType		type;						/* The speed object's type      */

	char		*value;						/* The speed object's value.    */

} Speed;
#endif







/*******************************************************************************************
 *  Function PROTOTYPES :
 *******************************************************************************************/

/* CONSTRUCTOR and DESTRUCTOR : */
Speed	*newSpeed(void);			/* Creates an empty Speed object structure. */
void 	freeSpeed(Speed *s);		/* Destroys a Speed object structure.       */ 


/* FILLING the Action object structure : */
void	setSpeedType(Speed *s, SpdType t);
void	setSpeedValue(Speed *s, char *value);
